package com.xuecheng.comment.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xuecheng.api.comment.model.dto.CommentReplyDTO;
import com.xuecheng.api.comment.model.vo.CommentReplyVO;
import com.xuecheng.comment.entity.CommentReply;
import com.xuecheng.comment.mapper.CommentReplyMapper;
import com.xuecheng.comment.service.CommentReplyService;
import com.xuecheng.comment.service.CommentService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author itcast
 */
@Slf4j
@Service
public class CommentReplyServiceImpl extends ServiceImpl<CommentReplyMapper, CommentReply> implements CommentReplyService {

    @Autowired
    private CommentService commentService;

    @Transactional
    public CommentReplyDTO replyMsg(CommentReplyVO commentReplyVO) {
        //判断关键数据
        //判断评论信息
        //判断评论是否允许回复
        //信息映射
        //将信息保存到数据库并保存
        //判断保存是否成功
        //数据转换并返回entity2dto
        return null;
    }

}
